#include <stdio.h>
#include <stdlib.h>
#include "shell.h"
#include "drv_syscall.h"

void ShellCmd_SVC_Test(const ShellCmdArgs *args)
{
    uint32_t ret;
    ret = Invoke_SVC_0(1, 2, 3, 4);
    printf("svc0 ret = %u\n", ret);
    ret = Invoke_SVC_1(12);
    printf("svc1 ret = %u\n", ret);
}
EXPORT_SHELL_CMD("svc", ShellCmd_SVC_Test);

#include "dev_common.h"
void ShellCmd_HardFault_Test(const ShellCmdArgs *args)
{
    HAL_NVIC_SetPriority(SVCall_IRQn, 15, 0);
    uint32_t ret;
    ret = Invoke_SVC_0(1, 2, 3, 4);
    printf("svc0 ret = %u\n", ret);
}
EXPORT_SHELL_CMD("fault", ShellCmd_HardFault_Test);